<div class="row">
    <div class="col-md-8">
        {{#each posts}}
            <div class="article">
                <h3><a href="/p/{{_id}}" title="{{title}}">{{title}}</a></h3>
                <span class="muted">{{time.minute}}</span>
                {{#if name}}
                    &nbsp; - &nbsp;
                    <span>Author: </span>
                    <a href="/u/{{name}}">
                        {{name}}
                    </a>
                {{/if}}

                {{#if tags }}
                    &nbsp; - &nbsp;
                    <span>Tags: </span>
                    {{#each tags}}
                        {{#if this}}
                        <i class="muted fa fa-tag"></i>&nbsp;
                        <a href="/tags/{{this}}" class="tag">{{this}}</a>
                        &nbsp;&nbsp;
                        {{/if}}
                    {{/each}}
                {{/if}}
                阅读：{{pv}} | 评论：{{comments.length}}
            </div>
        {{/each}}

        {{> page}}
    </div>
    <div class="col-md-4">
        {{#if user}}
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">个人信息</h3>
                </div>
                <div class="panel-body">
                    <img src="{{user.head}}" /><span>{{user.name}}</span>
                </div>
            </div>
        {{else}}
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">N-Blog：Node.js博客</h3>
                </div>
                <div class="panel-body">
                    您可以<a href="/login">登录</a>或<a href="/reg">注册</a>,
                    也可以<a class="btn btn-success" href="/login/github">
                    使用 GitHub 登录
                </a>
                </div>
            </div>
        {{/if}}
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">友情社区</h3>
                </div>
                <div class="panel-body">
                    <ul class="list-group">
                        <li class="list-group-item">
                            <a href="https://www.baidu.com" target="_blank">百度</a>
                        </li>
                        <li class="list-group-item">
                            <a href="http://weixin.com/" target="_blank">微信</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>


